<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath }/styles/style.css" />
<link type="text/css" href="${pageContext.request.contextPath }/scripts/jquery-ui-1.8.16.custom/css/sunny/jquery-ui-1.8.16.custom.css" rel="stylesheet" />
<title>Orders</title>
</head>
<body>
	<jsp:include page="parts/header.jsp"/>
	
	
	<div id="main" class="ui-widget-content form_pad">
	<jsp:include page="parts/choiceBar.jsp"></jsp:include>
	
	<div id="content">
	
	
		<h1> ADMIN ORDERS</h1>
		<hr/>
		<c:forEach var="element" items="${list}" varStatus="status" >
				<table id="ordersTableAdmin">
					<tr>
						<th>Order ID</th>
						<th>First Name</th>
						<th>Last Name</th>
						<th>Phone</th>
						<th>Order Date</th>
						<th>Arrival Date</th>
						<th>Departure Date</th>
						<th>Article</th>
					</tr>
					<tr>
						<td>${element["order"].orderId}</td>
						<td>${element["contact"].firstName}</td>
						<td>${element["contact"].lastName}</td>
						<td>${element["contact"].phone}</td>
						<td>${element["order"].orderDate}</td>
						<td>${element["order"].arrivalTime}</td>
						<td>${element["order"].departureTime}</td>
						<td>${element["room"].article}</td>
					</tr>
				</table>
				<form action="controller" method="post" id="formCreateBill">
							<input type="hidden" name="command" value="acceptOrders">
							<input type="hidden" name="orderId" value='${element["order"].orderId}'>
							<input type="submit" value="CREATE BILL">
				</form>
		</c:forEach>
		<hr/>
	</div>
	
	
	</div>
	<jsp:include page="parts/footer.jsp"/>
</body>
</html>